package org.dizem.groupon.model.domain;

import javax.persistence.*;
import java.util.Date;

/**
 * User: dizem@126.com
 * Time: 11-6-23 上午11:13
 */
@Entity(name = "t_merchant")
public class MerchantEntity {
	private int id;
	private String name;
	private String password;
	private String url;
	private String address;
	private String description;
	private String email;
	private Date regTime;
	private String bankName;
	private String bankNumber;
	private String phoneNumber;


	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column(length = 50, nullable = false)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}


	@Column(length = 50)
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(length = 100)
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(length = 500)
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(length = 50)
	public String getBankNumber() {
		return bankNumber;
	}

	public void setBankNumber(String bankNumber) {
		this.bankNumber = bankNumber;
	}

	@Column(length = 32, nullable = false)
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(length = 50)
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column
	public Date getRegTime() {
		return regTime;
	}

	public void setRegTime(Date regTime) {
		this.regTime = regTime;
	}

	@Column(length = 100)
	public String getBankName() {
		return bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	@Column
	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	@Override
	public String toString() {
		return "MerchantEntity{" +
				"id=" + id +
				", name='" + name + '\'' +
				", password='" + password + '\'' +
				", url='" + url + '\'' +
				", address='" + address + '\'' +
				", description='" + description + '\'' +
				", email='" + email + '\'' +
				", regTime=" + regTime +
				", bankName='" + bankName + '\'' +
				", bankNumber='" + bankNumber + '\'' +
				", phoneNumber='" + phoneNumber + '\'' +
				'}';
	}
}
